﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Lehavi.Controls;

public partial class SiteMaster : System.Web.UI.MasterPage
{
    protected void Page_Load(object sender, EventArgs e)
    {
		InitScript();
		LoadCrumbs();

    }

	private void LoadCrumbs()
	{
		if(!IsPostBack)
		if (Page is ICrumbedPage)
		{ 
			var page = Page as ICrumbedPage;
			crumbs.LoadData(page.Level, page.TailName);
		}
	}

	private void InitScript()
	{
		this.Page.RegisterJQuery();
		this.Page.RegisterUiCore();
		this.Page.RegisterUiDatePicker();
	}
	
}
